package br.org.group.android.utils;

import android.content.Context;
import br.org.group.android.app.FortuneProvider;
import br.org.group.android.dao.FortuneProviderDatabase;
import br.org.group.android.net.FortuneProviderService;

public class FortuneProviderUtils {

	private static FortuneProvider provider;

	private FortuneProviderUtils() {

	}

	public static FortuneProvider getInstance(Context ctx) {
		if (provider == null) {
			provider = new FortuneProviderDatabase(ctx);
		}

		return provider;
	}

	public static FortuneProvider getDBInstance(Context ctx) {
		provider = new FortuneProviderDatabase(ctx);
		return provider;
	}

	public static FortuneProvider getServiceInstance(Context ctx) {
		provider = new FortuneProviderService(ctx);
		return provider;
	}

}
